home *** CD-ROM | disk | FTP | other *** search
- on initsw
- global gswlist
- set gswlist to "18,21,24,19,22,25,20,23,26,0"
- end
-
- on checksw
- global gswlist
- set j to 0
- set l to 0
- set i to the mouseCast
- if i > 0 then
- repeat with k = 1 to 9
- if i = integer(item k of gswlist) then
- if k < 4 then
- if the mouseDown then
- set the puppet of sprite (k + 26) to 1
- set the castNum of sprite (k + 26) to i + 2
- else
- set the puppet of sprite (k + 26) to 1
- set the castNum of sprite (k + 26) to i + 1
- end if
- set l to k + 26
- exit repeat
- next repeat
- end if
- if k < 7 then
- if the mouseDown then
- set the castNum of sprite (k + 23) to i + 1
- end if
- set l to k + 23
- exit repeat
- next repeat
- end if
- if the mouseUp then
- set j to k - 6
- set the puppet of sprite (k + 20) to 0
- end if
- set l to k + 20
- exit repeat
- end if
- end repeat
- end if
- clearsw(l)
- return j
- end
-
- on clearsw n
- repeat with i = 27 to 29
- if i <> n then
- set the puppet of sprite i to 0
- end if
- end repeat
- end
-